package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsRemovalOrderDetailDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 亚马逊api获取移除订单详情表 Mapper 接口
 * </p>
 *
 * @author sjd
 * @since 2020-08-21
 */
public interface IMwsRemovalOrderDetailMapper extends BaseMapper<MwsRemovalOrderDetailDO> {
    /**
     * 根据订单id、sku、fnsku、disposition获取一条数据
     *
     * @param orderId
     * @param sku
     * @param fnSku
     * @param disposition
     * @return
     */
    MwsRemovalOrderDetailDO getOneInfoByOrderIdAndSkuAndFnSkuAndDisposition(@Param("orderId") String orderId, @Param("sku") String sku,
                                                                          @Param("fnsku") String fnSku, @Param("disposition") String disposition);

    /**
     * 根据参数获取OrderStatus
     * @param sellerId
     * @param orderId
     * @param sku
     * @return
     */
    String selectOrderStatus(String sellerId,String orderId,String sku);

    /**
     * 根据参数获取LastUpdateDate
     * @param sellerId
     * @param orderId
     * @param sku
     * @return
     */
    String selectLastUpdateDateBySellerIdAndOrderIdAndSku(String sellerId,String orderId,String sku);

    /**
     * 根据参数获取RemovalFee的和且removal_fee不为空
     * @param sellerId
     * @param orderId
     * @param sku
     * @param orderType
     * @return
     */
    Double selectRemovalFeeBySellerIdAndOrderIdAndSkuAndOrderType (String sellerId,String orderId,String sku,String orderType);

    /**
     * 根据参数获取DisposedQuantity的和且removal_fee不为空
     * @param sellerId
     * @param orderId
     * @param sku
     * @param orderType
     * @return
     */
    Integer selectDisposedQuantityBySellerIdAndOrderIdAndSkuAndOrderType(String sellerId,String orderId,String sku,String orderType);

    /**
     * 根据参数获取ShippedQuantity的和且removal_fee不为空
     * @param sellerId
     * @param orderId
     * @param sku
     * @param orderType
     * @return
     */
    Integer selectShippedQuantityBySellerIdAndOrderIdAndSkuAndOrderType(String sellerId,String orderId,String sku,String orderType);

    /**
     * 根据参数获取Currency
     * @param sellerId
     * @param orderId
     * @param sku
     * @return
     */
    String selectCurrency(String sellerId,String orderId,String sku);
}
